package cn.caplike.demo.apache.thrift;

import org.apache.thrift.TException;
import thrift.generated.DataException;
import thrift.generated.Person;
import thrift.generated.PersonService;

/**
 * Description:
 *
 * @author LiKe
 * @version 1.0.0
 * @date 2021-12-06 13:16
 */
public class PersonServiceImpl implements PersonService.Iface {

    @Override
    public Person getPersonByUsername(String username) throws DataException, TException {
        System.out.println("Get Client Param: " + username);

        Person person = new Person();
        person.setUsername(username);
        return person;
    }

    @Override
    public void savePerson(Person person) throws DataException, TException {
        System.out.println("Get Client Param: " + person);
        System.out.println(person.getUsername());
    }
}
